package org.example.commonapi.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.example.commonapi.dto.StudentSignInDto;

/**
 * 
 * @TableName student_sign_in
 */
@TableName(value ="student_sign_in")
@Data
@AllArgsConstructor
@NoArgsConstructor
public class StudentSignIn implements Serializable {
    /**
     * 学生签到记录
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 签到id
     */
    private Long signId;

    /**
     * 签到用户id
     */
    private Long userId;

    /**
     * 学生签到地址
     */
    private String address;

    /**
     * 构造函数
     * @param studentSignInDto
     */
    public StudentSignIn(StudentSignInDto studentSignInDto){
        this.id= studentSignInDto.getId();
        this.signId= studentSignInDto.getSignId();
        this.userId= studentSignInDto.getUserId();
        this.address= studentSignInDto.getAddress();
    }



    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}